home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / man.3 / GeomReq.3 < prev    next >
Text File  |  1995-07-21  |  8KB  |  264 lines

  1. '\"
  2. '\" Copyright (c) 1990, 1991 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" 
  22. '\" $Header: /user6/ouster/wish/man/RCS/GeomReq.3,v 1.7 93/04/01 09:41:21 ouster Exp $ SPRITE (Berkeley)
  23. '\" 
  24. .\" The definitions below are for supplemental macros used in Tcl/Tk
  25. .\" manual entries.
  26. .\"
  27. .\" .HS name section [date [version]]
  28. .\"    Replacement for .TH in other man pages.  See below for valid
  29. .\"    section names.
  30. .\"
  31. .\" .AP type name in/out [indent]
  32. .\"    Start paragraph describing an argument to a library procedure.
  33. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  34. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  35. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  36. .\"    needed;  use .AS below instead)
  37. .\"
  38. .\" .AS [type [name]]
  39. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  40. .\"    name are examples of largest possible arguments that will be passed
  41. .\"    to .AP later.  If args are omitted, default tab stops are used.
  42. .\"
  43. .\" .BS
  44. .\"    Start box enclosure.  From here until next .BE, everything will be
  45. .\"    enclosed in one large box.
  46. .\"
  47. .\" .BE
  48. .\"    End of box enclosure.
  49. .\"
  50. .\" .VS
  51. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  52. .\"    of man pages.
  53. .\"
  54. .\" .VE
  55. .\"    End of vertical sidebar.
  56. .\"
  57. .\" .DS
  58. .\"    Begin an indented unfilled display.
  59. .\"
  60. .\" .DE
  61. .\"    End of indented unfilled display.
  62. .\"
  63. '\"    # Heading for Tcl/Tk man pages
  64. .de HS
  65. .ds ^3 \\0
  66. .if !"\\$3"" .ds ^3 \\$3
  67. .if '\\$2'cmds'       .TH \\$1 1 \\*(^3 \\$4
  68. .if '\\$2'lib'        .TH \\$1 3 \\*(^3 \\$4
  69. .if '\\$2'tcl'        .TH \\$1 n \\*(^3 Tcl "Tcl Built-In Commands"
  70. .if '\\$2'tk'         .TH \\$1 n \\*(^3 Tk "Tk Commands"
  71. .if '\\$2'tclc'        .TH \\$1 3 \\*(^3 Tcl "Tcl Library Procedures"
  72. .if '\\$2'tkc'         .TH \\$1 3 \\*(^3 Tk "Tk Library Procedures"
  73. .if '\\$2'tclcmds'         .TH \\$1 1 \\*(^3 Tk "Tcl Applications"
  74. .if '\\$2'tkcmds'         .TH \\$1 1 \\*(^3 Tk "Tk Applications"
  75. .if t .wh -1.3i ^B
  76. .nr ^l \\n(.l
  77. .ad b
  78. ..
  79. '\"    # Start an argument description
  80. .de AP
  81. .ie !"\\$4"" .TP \\$4
  82. .el \{\
  83. .   ie !"\\$2"" .TP \\n()Cu
  84. .   el          .TP 15
  85. .\}
  86. .ie !"\\$3"" \{\
  87. .ta \\n()Au \\n()Bu
  88. \&\\$1    \\fI\\$2\\fP    (\\$3)
  89. .\".b
  90. .\}
  91. .el \{\
  92. .br
  93. .ie !"\\$2"" \{\
  94. \&\\$1    \\fI\\$2\\fP
  95. .\}
  96. .el \{\
  97. \&\\fI\\$1\\fP
  98. .\}
  99. .\}
  100. ..
  101. '\"    # define tabbing values for .AP
  102. .de AS
  103. .nr )A 10n
  104. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  105. .nr )B \\n()Au+15n
  106. .\"
  107. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  108. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  109. ..
  110. '\"    # BS - start boxed text
  111. '\"    # ^y = starting y location
  112. '\"    # ^b = 1
  113. .de BS
  114. .br
  115. .mk ^y
  116. .nr ^b 1u
  117. .if n .nf
  118. .if n .ti 0
  119. .if n \l'\\n(.lu\(ul'
  120. .if n .fi
  121. ..
  122. '\"    # BE - end boxed text (draw box now)
  123. .de BE
  124. .nf
  125. .ti 0
  126. .mk ^t
  127. .ie n \l'\\n(^lu\(ul'
  128. .el \{\
  129. .\"    Draw four-sided box normally, but don't draw top of
  130. .\"    box if the box started on an earlier page.
  131. .ie !\\n(^b-1 \{\
  132. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  133. .\}
  134. .el \}\
  135. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  136. .\}
  137. .\}
  138. .fi
  139. .br
  140. .nr ^b 0
  141. ..
  142. '\"    # VS - start vertical sidebar
  143. '\"    # ^Y = starting y location
  144. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  145. .de VS
  146. .mk ^Y
  147. .ie n 'mc \s12\(br\s0
  148. .el .nr ^v 1u
  149. ..
  150. '\"    # VE - end of vertical sidebar
  151. .de VE
  152. .ie n 'mc
  153. .el \{\
  154. .ev 2
  155. .nf
  156. .ti 0
  157. .mk ^t
  158. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  159. .sp -1
  160. .fi
  161. .ev
  162. .\}
  163. .nr ^v 0
  164. ..
  165. '\"    # Special macro to handle page bottom:  finish off current
  166. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  167. '\"    # page bottom macro.
  168. .de ^B
  169. .ev 2
  170. 'ti 0
  171. 'nf
  172. .mk ^t
  173. .if \\n(^b \{\
  174. .\"    Draw three-sided box if this is the box's first page,
  175. .\"    draw two sides but no top otherwise.
  176. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  177. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  178. .\}
  179. .if \\n(^v \{\
  180. .nr ^x \\n(^tu+1v-\\n(^Yu
  181. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  182. .\}
  183. .bp
  184. 'fi
  185. .ev
  186. .if \\n(^b \{\
  187. .mk ^y
  188. .nr ^b 2
  189. .\}
  190. .if \\n(^v \{\
  191. .mk ^Y
  192. .\}
  193. ..
  194. '\"    # DS - begin display
  195. .de DS
  196. .RS
  197. .nf
  198. .sp
  199. ..
  200. '\"    # DE - end display
  201. .de DE
  202. .fi
  203. .RE
  204. .sp .5
  205. ..
  206. .HS Tk_GeometryRequest tkc
  207. .BS
  208. .SH NAME
  209. Tk_GeometryRequest, Tk_SetInternalBorder \- specify desired geometry or internal border for a window
  210. .SH SYNOPSIS
  211. .nf
  212. \fB#include <tk.h>\fR
  213. .sp
  214. \fBTk_GeometryRequest\fR(\fItkwin, reqWidth, reqHeight\fR)
  215. .sp
  216. \fBTk_SetInternalBorder\fR(\fItkwin, width\fR)
  217. .SH ARGUMENTS
  218. .AS baseHeight clientData
  219. .AP Tk_Window tkwin in
  220. Window for which geometry is being requested.
  221. .AP int reqWidth in
  222. Desired width for \fItkwin\fR, in pixel units.
  223. .AP int reqHeight in
  224. Desired height for \fItkwin\fR, in pixel units.
  225. .AP int width in
  226. Space to leave for internal border for \fItkwin\fR, in pixel units.
  227. .BE
  228.  
  229. .SH DESCRIPTION
  230. .PP
  231. \fBTk_GeometryRequest\fR is called by widget code to indicate its
  232. preference for the dimensions of a particular window.  The arguments
  233. to \fBTk_GeometryRequest\fR are made available to the geometry
  234. manager for the window, which then decides on the actual geometry
  235. for the window.  Although geometry managers generally try to satisfy
  236. requests made to \fBTk_GeometryRequest\fR, there is no guarantee that
  237. this will always be possible.  Widget code should not assume that
  238. a geometry request will be satisfied until it receives a
  239. \fBConfigureNotify\fR event indicating that the geometry change has
  240. occurred.  Widget code should never call procedures like
  241. \fBTk_ResizeWindow\fR directly.  Instead, it should invoke
  242. \fBTk_GeometryRequest\fR and leave the final geometry decisions to
  243. the geometry manager.
  244. .PP
  245. If \fItkwin\fR is a top-level window, then the geometry information
  246. will be passed to the window manager using the standard ICCCM protocol.
  247. .PP
  248. \fBTk_SetInternalBorder\fR is called by widget code to indicate that
  249. the widget has an internal border.  This means that the widget draws
  250. a decorative border inside the window instead of using the standard
  251. X borders, which are external to the window's area.  For example,
  252. internal borders are used to draw 3-D effects.  \fIWidth\fR
  253. specifies the width of the border in pixels.  Geometry managers will
  254. use this information to avoid placing any children of \fItkwin\fR
  255. overlapping the outermost \fIwidth\fR pixels of \fItkwin\fR's area.
  256. .PP
  257. The information specified in calls to \fBTk_GeometryRequest\fR and
  258. \fBTk_SetInternalBorder\fR can be retrieved using the macros
  259. \fBTk_ReqWidth\fR, \fBTk_ReqHeight\fR, and \fBTk_InternalBorderWidth\fR.
  260. See the \fBTk_WindowId\fR manual entry for details.
  261.  
  262. .SH KEYWORDS
  263. geometry, request
  264.